#import "CommonViewController.h"
#import "THChatInput.h"
#import "FaceBoard.h"
#import "VoiceTipsView.h"
#import <AVFoundation/AVFoundation.h>

@class VoiceButtonView;

@interface ChatViewController : CommonViewController<UITableViewDataSource,UITableViewDelegate,UIActionSheetDelegate,UIImagePickerControllerDelegate,
UINavigationControllerDelegate,AVAudioPlayerDelegate>
{
    int                     recordTimer;
    bool                    bStartRecord;
    UIImageView             *inputbgv;
    UIButton                *picturebtn;
    UIImageView             *inputbg;
    UIButton                *sendbtn;
    THChatInput             *chatInput;
    FaceBoard               *emojiInputView;
    VoiceButtonView         *voiceButton;
    VoiceTipsView           *voiceTipsView;
    NSTimer                 *voiceRecordTimer;
    AVAudioPlayer           *player;
    
    int                     playingVoiceIndex;
    int                     iSheetType;
    UIButton                *pressBtn;
    NSMutableDictionary     *StateFailDic;
}

@property(nonatomic,strong)     UILabel                 *titleLab;
@property(nonatomic,strong)     NSString                *strName;
@property(nonatomic,strong)     UITableView             *mtablev;
@property (nonatomic, strong)   NSMutableArray          *rowHeights;
@property (nonatomic, retain)   NSMutableArray          *chatArray;
@property (nonatomic, retain)   NSMutableDictionary     *emojiDic;

-(void)reloadChatView;
-(void)showActionView;
-(void)PopGiftSheet;
-(void)ShowSendGift;
-(void)PopResendSheet;

-(void)setVoiceCannel;
-(void)setVoiceSuccee;

-(void)TelepthyFail;

@end
